<ion-view view-title="限时抢购" class="myworld_sale">

	<!--描述：滑动块-->
	<ion-content scroll="false">
		<div class="row text-center font-large-my padding-0">
			<div class="col" on-tap="activeSlide(0)" ng-class="selectIndex==0?'top-activated':''">
				<img src="img/group1.png" /><br /> 活动设置
			</div>
			<div class="col" on-tap="activeSlide(1)" ng-class="selectIndex==1?'top-activated':''">
				<img src="img/group2.png" /><br /> 抢购对象
			</div>
			<div class="col" on-tap="activeSlide(2)" ng-class="selectIndex==2?'top-activated':''">
				<img src="img/b4.png" /><br /> 抢购红包
			</div>
		</div>

		<ion-slide-box delegate-handle="main-handle" on-slide-changed="slideChanged(index)" active-slide="slideIndex" show-pager="false">

			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>

					<!--不能引入外部页面，因为这里要求可输入的，而外部文件是不可输入的-->
					<!--<div ng-include="'templates/myworld/sale/activitysetting_tem.html'"></div>-->
					<div class="list">
						<li class="item text-center" style="color: black;">
							发起营销活动（团购）
						</li>
						<li class="item item-input">
							<span class="input-label">
				       	   		  活动名称：
				       	   	</span>
							<input type="text" placeholder="请输入活动名称" ng-model="scope.name" />
						</li>
						<li class="item item-input" ion-datetime-picker title="'请输入开始时间'" ng-model="scope.start_time">
							<span class="input-label">开始时间：</span>
							<input type="text" placeholder="请输入开始时间" class="timeLight" ng-class="{'timeNoneInfo':scope.start_time}">{{scope.start_time| date: "yyyy-MM-dd H:mm:ss"}}</input>
						</li>
						<li class="item item-input" ion-datetime-picker title="'请输入开始时间'" ng-model="scope.end_time">
							<span class="input-label">结束时间：</span>
							<input type="text" placeholder="请输入结束时间" class="timeLight" ng-class="{'timeNoneInfo':scope.end_time}">{{scope.end_time| date: "yyyy-MM-dd H:mm:ss"}}</input>
						</li>
						<li class="item item-toggle">
							临时群
							<label class="toggle toggle-positive">
				             <input type="checkbox" checked="" ng-model="scope.create_group">
				             <div class="track">
				               <div class="handle"></div>
				             </div>
				           </label>
						</li>

						<li class="item item-toggle">
							自动红包
							<label class="toggle toggle-positive">
				             <input type="checkbox" checked="" ng-model="scope.has_packets">
				             <div class="track">
				               <div class="handle"></div>
				             </div>
				           </label>
						</li>
						<li class="item item-input">
							上传图片：
							<div class="file-show">
								<div class="add input-file" ng-repeat="img in scope.image" style="overflow: initial;">
									<div style="position: absolute;margin-left: 1.5rem;margin-top: -1.0rem;font-size: 1.0rem;color: #333333;" on-tap="ondelete($index)"><i class="icon ion-close-circled"></i></div>
									<img style="width: 100%;height: 100%;" src="{{img.image}}">
								</div>
							</div>
							<div class="add input-file" on-tap="doShowFile()">
								<span class="icon ion-plus"></span>
							</div>
							<input id="upfilebutton" type="file" multiple="multiple" accept="image/*" onchange="angular.element(this).scope().onupload(this)" style="display: none;" />
						</li>
						<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
								<div class="input-label">品牌</div>
								<div class="input-value" ng-click="doSelectBrand()">{{input.brand.name}}</div>
							</div>
						<li class="item item-input-inset">
							品类：
							<div class="input-value small" ng-click="doSelectCat1()">{{input.cat1.name}}</div>
							<div class="input-value small" ng-click="doSelectCat2()">{{input.cat2.name}}</div>
							<div class="input-value small" ng-click="doSelectCat3()">{{input.cat3.name}}</div>
							<i class="icon ion-plus-circled positive font-1rem-my" on-tap="input_cat_data()"></i>
						</li>
						<li class="item item-icon-right padding-5" ng-repeat="cat in cats" style="font-size: 0.5rem;">
							<span ng-class="{invisible:$index>0}" style="padding-left: 5px;">已选品类：</span>{{cat}}
							<i class="icon ion-ios-close-outline font-1rem-my assertive" on-tap="delete_type($index)"></i>
						</li>
					</div>

					<div class="button-bar padding">
						<button class="button  button-assertive">取消</button>
						<button class="button  button-positive col-offset-10" on-tap="submit()">保存</button>
					</div>

					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>

			<!--抢购对象-->
			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
					<!--引入外部的页面-->
					<div ng-include="'templates/myworld/sale/promotionObject_tem.html'"></div>
					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>

			<!--抢购红包-->
			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
					<!--引入外部的文件-->
					<div ng-include="'templates/myworld/discount/promotionredbag_tem.html'"></div>
					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>

		</ion-slide-box>
	</ion-content>
</ion-view>